import request from '@/utils/request'

// 查询参数配置字典列表
export function parameterConfigList(query) {
  return request({
    url: '/basic/param/list',
    method: 'get',
    params: query
  })
}

// 查询类型详细
export function getParameterTypeDetail(paramId) {
  return request({
    url: '/basic/param/' + paramId,
    method: 'get'
  })
}

// 新增类型
export function addParameterType(data) {
  return request({
    url: '/basic/param',
    method: 'post',
    data: data
  })
}

// 修改类型
export function updateParameterType(data) {
  return request({
    url: '/basic/param',
    method: 'put',
    data: data
  })
}

// 删除类型
export function delParameterType(dictCode,paramType) {
  return request({
    url: `/basic/param/${paramType}/` + dictCode,
    method: 'delete'
  })
}

// 获取参数下拉框列表
export function optionParam(params = {paramType: '', paramName: ''}) {
  return request({
    url: '/basic/param/option',
    method: 'get',
    params
  })
}
